@import "jquery.ui.css";

@import "utils";
@import "theme";

body {
  background: #D2D2D2;
  -webkit-font-smoothing: antialiased;
}

.vdivide {
  width: 6px;
  border: 1px solid #C5C5C5;
  border-width: 0 1px 0 1px;
  border-right-color:  rgba(0, 0, 0, 0.3);
  
  .hbg-gradient(#F9F9F9, #DFE0E1);
}

#title {
  overflow: hidden;
  height: 50px;
  .border-box();  
  .inset-box-shadow(0px, -1px, 3px, #1D1D1D);
  .vbg-gradient(#474747, #303030);
}

#title h1 {
  color: #FFF;
  text-shadow: 0 1px 1px #000;
  
  line-height: 50px;
  margin: 0;
  padding: 0 25px;
  float: left;
  
  border-right: 1px solid #181818;
  .box-shadow(1px, 0px, 1px, #525252);  
}

#title ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#title ul li {
  padding: 15px 25px;
  float: left;
  cursor: pointer;
  
  border-right: 1px solid #181818;
  .box-shadow(1px, 0px, 1px, #525252);  
  
  color: #FFF;
  text-shadow: 0 -1px 1px #000;
  font-weight: bold;
  
  :active {
    background: #292929;
    .inset-box-shadow(0, 0, 10px, #181818);
  }
}

#title ul li span {
  .border-radius(12px);
  padding: 4px 7px 2px 7px;
  margin-left: 5px;
  text-shadow: 0 -1px 1px #46677F;
  .vbg-gradient(#7BB5DB, #4775B8);
  .inset-box-shadow(0, 1px, 1px, #000);
  
  /* Initial state is hidden */
  display: none;
}

#title ul li[data-name="conversations"] span {
}

#title input {
  margin: 13px 15px;
  float: right;
  font-size: 20px;
}

#wrapper {
  position: absolute;
  top:    50px; /* Header */
  right:  0;
  bottom: 0;
  left:   0;
  
  .hbox();
}

#sidebar {
  background: #EDEDED;
  width: 200px;
  .box-flex(0);
  overflow: hidden;
}

#sidebar h3 {
  margin:  10px 0 0 0;
  padding: 7px 7px 7px 15px;
  list-style: none;

  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  
  .vbg-gradient(#FFF, #E0E0E1);
  .box-shadow(0, -5px, 10px, #E4E4E4);
  
  :first-child {
    margin-top: 0;
  }
}

#sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  
  li {
    display: block;
    padding: 10px 10px 7px 20px;
    border-bottom: 1px solid #CDCDCC;
    cursor: pointer;

    .box-shadow(0, 1px, 1px, #FCFCFC);
  }
  
  li.current {
    color: #FFF;
    text-shadow: 0 -1px 1px #46677F;
    .vbg-gradient(#7BB5DB, #4775B8);
    border-bottom-color: #609FD0;

    .inset-box-shadow(0, 2px, 2px, #4775B8);
    -webkit-box-shadow: inset 0 1px 1px #4775B8, inset 0 -1px 1px #3E67A3;
  }
}

#sidebar input[type="search"] {
  font-size: 20px;
  margin: 15px 10px;
  width: 170px;
}

#content {
  .box-flex(1);
  .vbox();
  overflow: hidden;  
}

#content > *:not(.active) {
  display: none !important;
}

#messages {
  .box-flex(1);
  .vbox();
}

#messages .items {
  list-style: none;
  margin: 0;
  padding: 0;
  .box-flex(1);
  overflow: auto;
  
  .vbg-gradient(#FCFCFC, #EFEFEF);  
  color: #373737;
  text-shadow: 0 1px 1px #FFF;
}

#messages .item {
  position: relative;  
  border-bottom: 1px solid #CDCDCC;
  .box-shadow(0, 1px, 1px, #FCFCFC);
  display: block;
  overflow: hidden;
  
  .body {
    display: block;
    margin-left: 130px;
    padding: 10px 15px;
    
    -webkit-user-select: text;
    border-left: 1px solid rgba(0, 0, 0, 0.2);    
  }
  
  .name {
    display: block;
    float: left;
    width: 90px;
    padding: 10px 20px;

    .ellipsis();
    font-weight: bold;
    text-align: right;    
  }
  
  :last-child {
    border-bottom: 0;

    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
}

#messages .new {
  .box-flex(0);
  border-top: 1px solid rgba(0, 0, 0, 0.4);
  .hbox();

  .vbg-gradient(#E6E6E7, #FAFAFA);
}

#messages .new textarea {
  min-height: 60px;
  padding: 10px;
  .box-flex(1);
  display: block;
  
  /* Override theme */
  .border-radius(0);
  background: none;
  border: 0;
  font-family: Helvetica, Arial, "MS Trebuchet", sans-serif;
            
  :focus {
    outline: none;
  }
}

#messages .new button {
  margin: 5px;
  color: #FFF;
  text-shadow: 0 -1px 1px #46677F;
  .vbg-gradient(#7BB5DB, #4775B8);
  border: 1px solid rgba(0, 0, 0, 0.1);
 
  :active {
    border-left-color: #A8A8A8;
    background: #7BB5DB;
    .inset-box-shadow(0, 0, 10px, #4775B8);
  }  
}

#settings {  
  button {
    padding: 8px 20px;
    font-size: 15px;
  }
}

#settings .channels {
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: bold;
  cursor: pointer;
  width: 200px;
  
  li {
    position: relative;
    padding: 2px 0;
  }
  
  .edit { display: none; }
  .editing .edit { display: block; }
  .editing .view { display: none; }
  
  .destroy {
    position: absolute;
    right: 0;
    top: 0;
    display: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    background: url(/images/destroy.png) no-repeat center center;
  }

  li:hover .destroy {
    display: block;
  }
}

#settings h2 {
  font-size: 23px;
  padding: 20px 15px;
  .vbg-gradient(#FCFCFC, #EFEFEF);  
  .box-shadow(0, 1px, 2px, rgba(0,0,0,0.2));
}

#settings div {
  padding: 0 15px;  
}

#searches {
  .box-flex(1);
  .vbox();
}

#searches .items {
  list-style: none;
  margin: 0;
  padding: 0;
  .box-flex(1);
  overflow: auto;
  
  .vbg-gradient(#FCFCFC, #EFEFEF);  
  color: #373737;
  text-shadow: 0 1px 1px #FFF;
}

#searches .item {
  position: relative;  
  border-bottom: 1px solid #CDCDCC;
  .box-shadow(0, 1px, 1px, #FCFCFC);
  display: block;
  overflow: hidden;
  cursor: pointer;
  
  .body {
    display: block;
    margin-left: 130px;
    padding: 10px 15px;
    
    -webkit-user-select: text;
    border-left: 1px solid rgba(0, 0, 0, 0.2);    
  }
  
  .name {
    display: block;
    float: left;
    width: 90px;
    padding: 10px 20px;

    .ellipsis();
    font-weight: bold;
    text-align: right;    
  }
  
  :last-child {
    border-bottom: 0;

    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
}

#searches h2 {
  font-size: 23px;
  padding: 20px 15px;
  margin: 0;
  .vbg-gradient(#FCFCFC, #EFEFEF);  
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}